<?php

if ( ! defined('BASEPATH')) exit('No direct script access allowed');

/**
 * [utf8 设置]
 * @return [type] [description]
 */
function utf8(){
    header("Content-type:text/html;charset=utf-8");
}

/**
 * [success 显示信息，并跳转到指定指定位置（控制器/方法）]
 * @param  [type] $url [控制器/方法]
 * @param  [type] $msg [提示信息]
 * @return [type]      [description]
 */
function message($url,$msg){
    utf8();
    $url = site_url($url);
    echo "<script type='text/javascript'>alert('$msg');location.href='$url';</script>";
    exit();
}